package com.pinxiang.framework.weather.power.service.impl;

import com.pinxiang.framework.weather.power.mapper.EquipmentMapper;
import com.pinxiang.framework.weather.power.model.Equipment;
import com.pinxiang.framework.weather.power.service.IEquipmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * Created by spc on 2018/5/31.
 */
@Service
public class EquipmentServiceImpl implements IEquipmentService {

    @Autowired
    private EquipmentMapper equipmentMapper;

    @Override
    public List<Equipment> findByParams(Map map) {
        return equipmentMapper.selectByParams(map);
    }

    /**
     * 按分类分组设备
     * @return
     */
    @Override
    public List<Equipment> findGroupBycategory() {
        return equipmentMapper.findGroupBycategory();
    }

    @Override
    public List<String> findAll(Map map) {
        return equipmentMapper.selectAll(map);
    }

    @Override
    public List<Equipment> findGroupDevice(Map map) {
        return equipmentMapper.findGroupDevice(map);
    }

    @Override
    public List<Equipment> findGroupEqu(String devicecode) {
        return equipmentMapper.findGroupEqu(devicecode);
    }
}
